using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using WebControls;
using BusinessLayer;
using InfraStructureLayer;

public partial class UserControls_uctNewsArchive : SFUserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
       
    }
    protected bool sfrNewsArchive_NeedsDataSource()
    {
        busNews insBusNews = new busNews();
        DataTable insDataTableNews = insBusNews.SelectNewsArchive();
        if (insBusNews.HasErrors)
        {
            MessageBoxShow(insBusNews);
            return true;
        }

        sfrNewsArchive.SetData(insDataTableNews);
        return insBusNews.HasErrors;
    }
    protected void ibtRss_Click(object sender, ImageClickEventArgs e)
    {
        Response.Redirect("~/" + CurrentContext.Language + "/Rss/RssNews.ashx");
    }
    protected void lbtShowAll_Click(object sender, EventArgs e)
    {
        Response.Redirect("~/" + CurrentContext.Language + "/News/default.aspx");
    }
    protected string GenerateUrl(object obj)
    {
        return "~/" + CurrentContext.Language + "/News/" + new Crypto().EncryptURL(obj.ToString()) + ".aspx";
    }
}
